<template>
  <NavBar title="个人中心" />
  <div class="headPic">
    <van-image round width="3rem" height="3rem"
      src="https://tse4-mm.cn.bing.net/th/id/OIP-C.jJhCsyptbVkfNd7fpNc_uAHaHa?w=203&h=203&c=7&r=0&o=5&dpr=1.3&pid=1.7" />
    <div class="username">
      嘉茄
    </div>

  </div>
  <div class="cont">
    <p>个人资料</p>
    <p @click="qgwc">购物车</p>
  </div>
  <CommonTabbar />

  <div style="margin: 16px;" @click="goOut">
    <van-button round block plain hairline type="primary" native-type="submit">退出登录</van-button>
  </div>
</template>

<script setup lang="ts">
import CommonTabbar from '@/components/CommonTabbar.vue';
import NavBar from '@c/NavBar.vue'
import { userdetail } from '@a/index'
import { useRouter } from 'vue-router'
const router = useRouter()
const qgwc = () => {
  router.push({
    path: '/cart'
  })
}
const goOut = () => {
  localStorage.clear();
  history.go(0)
}

</script>

<style lang="scss" scoped>
.headPic {
  width: 100%;
  margin-top: 50px;
  background-color: pink;
  height: 5rem;
  display: flex;
  align-items: center;
  border-radius: 0 0 0 50%;
  padding-left: 60px;

  .username {
    font-size: 30PX;
    margin-left: 60px;
  }
}

.cont {
  margin-top: 40px;
  width: 100%;


  p {
    line-height: 30px;
    padding-left: 20px;
    border-bottom: 1px solid #999;
    margin-bottom: 10px;
  }

}
</style>